from Page.Page1 import Page1
from selenium.webdriver.common.by import By

class Page2(Page1):
    # 写 信 id="_mail_component_98_98" id="_mail_component_481_481"
    writer_loc = (By.ID,'_mail_component_98_98')
    def writer(self):
        self.click(self.writer_loc)
    # 收件人 class="nui-editableAddr-ipt" //*[@id="_mail_emailinput_0_360"]/input
    person_loc = (By.CSS_SELECTOR,'.nui-editableAddr-ipt')
    def person(self):
        self.send_keys(self.person_loc,'s3080172040@126.com')
    # 主题 id="1760321469790_subjectInput"
    # id="1760321585497_subjectInput"
    # title_loc = (By.XPATH,'//input[contains(@id,subjectInput)]')
    title_loc = (By.XPATH,'//input[starts-with(@id,176032)]')
    def title(self):
        self.send_keys(self.title_loc,'自动化测试')
    # 框架 class="APP-editor-iframe"
    kj2_loc = (By.CSS_SELECTOR,'.APP-editor-iframe')
    def kj2(self):
        self.iframe(self.kj2_loc)
    # /html/body class="nui-scroll"
    neir_loc = (By.XPATH,'/html/body')
    def neir(self):
        self.send_keys(self.neir_loc,'UI自动化测试')
    # 断言2 <15235688537@163.com> class="bf0"
    dy2_loc = (By.CLASS_NAME,'bf0')
    def dy2(self):
        return self.text(self.dy2_loc)
    # 发送 class="nui-btn-text"
    send_loc = (By.CLASS_NAME,'nui-btn-text')
    def send(self):
        self.click(self.send_loc)